package com.mdd.usercenter.once;

import com.mdd.usercenter.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Insert {
    @Autowired
    private UserMapper userMapper;


    /**
     * 插入用户
     */
    //@Scheduled(fixedRate = Long.MAX_VALUE)
    public void insertUser(){
//
//        StopWatch stopWatch = new StopWatch();
//        stopWatch.start();
//        for (int i = 0; i < 1000; i++) {
//            User user = new User();
//            user.setUsername("假用户");
//            user.setUserAccount("fakeUser");
//            user.setAvatarUrl("http://localhost:3000/src/img/img_1.png");
//            user.setGender(0);
//            user.setUserPassword("12345678");
//            user.setPhone("18790769617");
//            user.setEmail("3138764353@qq.com");
//            user.setUserStatus(0);
//            user.setUserRole(0);
//            user.setPlanetCode("123456");
//            user.setTags("[]");
//            userMapper.insert(user);
//        }
//        stopWatch.stop();
//        stopWatch.getTotalTimeMillis();
    }


}
